package com.haiyou.dc.mq.listener;

import com.haiyou.dc.mq.vo.LogVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

/**
 * 日志消息消费服务
 *
 * @author huangzl
 */
@Component
@Slf4j
public class LogConsumerListener {

    @RabbitListener(queues = "${mq.log.queue}", containerFactory = "singleListenerContainer")
    public void handleMessage(@Payload LogVo logVo) {
        log.info("---------------------------->{}", logVo);
    }

}
